<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <property name="HOME_LOG" value="logs"/>
    <property name="LOG_FILE" value="logs/log_tmgQuiz_"/>

    <timestamp key="timestamp" datePattern="dd-MM-yyyy"/>

    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} [%cyan(%thread)] %highlight(%-5level) %cyan(%logger{25}) - %msg %n</pattern>
        </encoder>
    </appender>

    <appender name="rolling" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${LOG_FILE}${timestamp}.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.gz</fileNamePattern>
            <maxHistory>30</maxHistory>
            <totalSizeCap>3GB</totalSizeCap>
        </rollingPolicy>
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %n</pattern>
        </encoder>
    </appender>

    <root level="info">
        <appender-ref ref="console"/>
        <appender-ref ref="rolling"/>
    </root>

</configuration>